package com.kanavi.stand.entity;

import com.kanavi.stand.mapper.UserStandInfoMapper;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author tanghailan
 * @date 2020-10-22 18:15
 */
@Component
@Transactional(rollbackFor = Exception.class)
public class MyThread extends Thread {
    @Resource
    private UserStandInfoMapper standInfoMapper;

    @Override
    public void run() {
        UserStandInfo userStandInfo1 = new UserStandInfo().
                setStandCountDate(11L).
                setStandCountTotal(112L).
//                setUserId("11").
                setCreateTime(new Date());
        standInfoMapper.insert(userStandInfo1);
    }
}
